package cn.edu.lingnan.mapper;

import cn.edu.lingnan.domain.Dto.UserLoginDto;
import cn.edu.lingnan.domain.Dto.UserRegisterDto;
import cn.edu.lingnan.domain.Vo.UserVo;
import cn.edu.lingnan.domain.Vo.User_ProjectVo;
import cn.edu.lingnan.domain.pojo.Permission;
import cn.edu.lingnan.domain.pojo.User;
import cn.edu.lingnan.domain.pojo.UserProject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper
public interface UserMapper {

    User login(UserLoginDto userLoginDto);

    List<Permission> getPermissions(Integer roleId);

    void register(UserRegisterDto userRegisterDto);

    User_ProjectVo findUserById(Integer userId);

    UserProject findUserProject(@Param("projectId") Integer projectId, @Param("userId") Integer userId);

    void addMember(@Param("projectId") Integer projectId, @Param("userId") Integer userId) ;

    void recoverMember(@Param("projectId") Integer projectId, @Param("userId") Integer userId);

    String getPassWord(Integer userId);

    Integer countUser();

    Integer countTeacher();
}
